import http from '@/utils/request'

export function addPrize(param) {
	return http.post('/shop/prize/add',param)
}

export function listPrizes(times) {
	return http.get('/shop/prize/list/' + times)
}

export function waitAddPrizes(times) {
	return http.get('/shop/prize/waitadd/' + times)
}

export function addToPrizes(param) {
	return http.post('/shop/prize/addtoprizes',param)
}

export function allPrizes() {
	return http.get('/shop/prize/all')
}

export function delPrize(id) {
	return http.get('/shop/prize/del/' + id)
}

export function editPrize(param) {
	return http.post('/shop/prize/edit', param)
}

export function getShopLotteryStatus() {
	return http.get('/shop/prize/lotterystatus')
}

export function enableLottery(val) {
	return http.get('/shop/prize/enablelottery/' + val)
}

// 根据id获取奖品
export function getPrizeById(prizeId) {
	return http.get('/shop/prize/getById/' + prizeId)
}